package strategy.strategy_plane;

public class Test {
    public static void main(String[] args){
        Plane plane = new Helicopter();
        System.out.println(plane.getName() + ":" + plane.getTakeOff().takeOff() + ";" + plane.getFly().fly());
        plane.setFly(new SuperSonicFly());
        System.out.println(plane.getName() + ":" + plane.getTakeOff().takeOff() + ";" + plane.getFly().fly());

        plane = new AirPlane();
        System.out.println(plane.getName() + ":" + plane.getTakeOff().takeOff() + ";" + plane.getFly().fly());

        plane = new Fighter();
        System.out.println(plane.getName() + ":" + plane.getTakeOff().takeOff() + ";" + plane.getFly().fly());

        plane = new Harrier();
        System.out.println(plane.getName() + ":" + plane.getTakeOff().takeOff() + ";" + plane.getFly().fly());

    }
}
